﻿using Clipper.ClipperWindow;
using Global;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Clipper.ClipperUserControl
{
    /// <summary>
    /// UserDisplayResultToday.xaml 的交互逻辑
    /// </summary>
    public partial class UserDisplayResultToday : UserControl
    {
        public UserDisplayResultToday()
        {
            InitializeComponent();
        }

        public void DataBind()
        {
            //ServiceProvider.Monitor.DetectResultList = mbll.GetModelList();
            this.DataContext = ServiceProvider.Monitor;
        }

        private void displayResultToday_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (ServiceProvider.SelfCheckPass)
            {
                if (displayResultToday.SelectedItem != null)
                {
                    WinResultShow win = new WinResultShow();
                    win.Tag = displayResultToday.SelectedItem;
                    //win.Content = "today";
                    //win.Closed += new EventHandler(win_Closed);
                    win.ShowDialog();
                }
            }
            else
            {
                UIHelper.ShowKeyMessage("PleaseSelfCheck");
            }
        }

        private void displayResultToday_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {

        }
    }
}
